package day07test;

public class Test3 {
    public static void main(String[] args) {
int count = 0;
        for (int i = 2; i < 200; i++) {
            boolean flag = true;
            for (int j = 2; j <= i/2; j++) {
                if (i%j == 0){
                    flag = false;
                }
            }
            if (flag){
                System.out.println(i + "是一个质数");
                count++;
            }

        }
        System.out.println("一共有" + count+ "个质数");
    }
}
